<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax demo</title>
</head>
<body>
    <div>
        <input type="submit" value="send" onclick="send();">
    </div>

    <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
    <script>
        function send(){
            $.post(
                "/community/alpha/ajax",
                {"name": "Tom", "age": 23},
                function(resp){
                    var data = $.parseJSON(resp);
                    console.log("code: " + data.code);
                    console.log("msg: " + data.msg);
                }
            )
        }
    </script>
</body>
</html>